package com.open.capacity.paper.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.open.capacity.common.model.PaperRecord;
import com.open.capacity.paper.vo.PaperRecordCountVo;
import com.open.capacity.paper.vo.PaperRecordVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author liangd
 * @since 2021-02-23 16:17
 */
@Mapper
public interface PaperRecordDao extends BaseMapper<PaperRecord> {

    List<PaperRecord> findPaperRecord(@Param("papeid") Integer papeid, @Param("userid") Long userid);

    List<PaperRecord> findList(Map<String, Object> params);

    int deletePaperRecord(@Param("papeid")Integer pareid,@Param("userid") Long userid);

    int updateByPaperIdAndUserId(PaperRecord paperRecord);

    List<PaperRecordCountVo> getPaperPieData(Integer papeid);
}
